@import './../../../_variables';
@import './../../features/tasks/task/task.component.mixins';

.scheduled-task,
.repeat-task-cfg {
  margin-bottom: $s;
  padding: $s * 0.5 $s * 2;
  @include dividerBorderColor(1px);
  box-shadow: none;
}

.start-task-btn {
  display: none;

  @include mq(xs) {
    background-color: inherit;
    display: block;
    margin-left: -$s;
    margin-right: $s;
    transition: $transition-duration-m;
    opacity: 0;
    .scheduled-task:hover & {
      opacity: 1;
    }
  }

  &:hover {
    box-shadow: $whiteframe-shadow-2dp;
  }
}

.scheduled-task-content,
.repeat-task-cfg-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scheduled-task-content {
  .task-info {
    flex: 1;
    display: flex;
    //flex-direction: column;
    align-items: center;

    @include mq(xs) {
      flex-direction: row;
    }
  }

  .title {
    flex: 1;
    padding-top: $s;
    //padding-bottom: $s;
    display: flex;
    flex-direction: column;

    ::ng-deep .tags-container {
      margin-left: 0;
      margin-bottom: 0;
      padding-bottom: 0;
    }
  }

  .due-date {
    border-radius: $card-border-radius;
    display: flex;
    font-style: italic;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding-left: $s;
    padding-right: $s;

    min-height: $mat-mini-fab-size;
    text-align: right;
    opacity: 0.9;

    @include mq(xs) {
      margin: 0 $s * 2;
      margin-right: $s;
      flex-direction: row;
    }
    @include mq(xs, max) {
      font-size: 13px;
      margin-right: $s * -1;
    }

    .time-left {
      opacity: 0.9;
    }

    &:hover {
      opacity: 1;
    }

    .date-and-time-left {
      margin-top: auto;
      margin-bottom: auto;

      @include mq(xs) {
        margin-right: $s;
      }
    }

    mat-icon {
      display: none;
      @include mq(xs) {
        display: block;
        opacity: 0.8;
      }
    }

    &:hover mat-icon {
      opacity: 1;
    }
  }
}

.repeat-task-cfg-content {
  .task-info {
    flex: 1;
    display: flex;
    //flex-direction: column;
    align-items: center;

    @include mq(xs) {
      flex-direction: row;
    }
  }

  tag-list {
    pointer-events: none;
  }

  .title {
    flex: 1;
    padding-top: $s;
    //padding-bottom: $s;
    display: flex;
    flex-direction: column;

    ::ng-deep .tags-container {
      margin-left: 0;
      margin-bottom: 0;
      padding-bottom: 0;
    }
  }
  .repeat-text-and-icon {
    border-radius: $card-border-radius;
    display: flex;
    font-style: italic;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding-left: $s;
    padding-right: $s;

    min-height: $mat-mini-fab-size;
    text-align: right;
    opacity: 0.9;

    @include mq(xs) {
      margin: 0 $s * 2;
      margin-right: 0;
      flex-direction: row;
    }
    @include mq(xs, max) {
      font-size: 13px;
      margin-right: $s * -1;
    }

    &:hover {
      opacity: 1;
    }

    mat-icon {
      display: none;
      @include mq(xs) {
        display: block;
        opacity: 0.8;
        margin-left: $s;
      }
    }

    &:hover mat-icon {
      opacity: 1;
    }
  }
}

.project {
  margin-top: $s * 0.5;
  // to align with task title
  margin-left: $s;
  font-size: 11px;
  display: flex;
  align-items: center;
}

.no-scheduled-tasks {
  margin: $s;
  margin-top: $s * 2;
  text-align: center;
}

.task-title {
  @include taskTitle;
  // to account for the task titles inner padding
  margin-top: -8px;
  margin-left: -2px;
}

.action-btn {
  display: block;

  :host-context(.isNoTouchOnly) & {
    opacity: 0.7;

    &:hover {
      opacity: 1;
    }
  }

  &:last-of-type {
  }
}
